<!-- subpkg_consult/order_list/order_list.vue -->
<script lang="ts" setup>
  import { ref } from 'vue'
  import customTab from '@/components/custom-tab/custom-tab.vue'
  // 订单列表组件
  import orderList from './components/order-list.vue'

  // 标签索引值
  const tabIndex = ref(1)
  // 标签页数据
  const orderTabs = ref([{ label: '问医生' }, { label: '极速问诊' }, { label: '开药问诊' }])

  const tabChange = (index: number) => {
    tabIndex.value = index + 1
  }
</script>

<template>
  <view class="consult-page">
    <view class="consult-status-tabs">
      <custom-tab :data="orderTabs" @change="tabChange"></custom-tab>
    </view>

    <!-- 订单列表 -->
    <order-list :type="tabIndex" />
  </view>
</template>

<style scoped></style>
